import socket
HOST='localhost'
POST=10000
obj=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
obj.connect((HOST,POST))#初始化tcp服务
data='你好，A'
while data:
    obj.sendall(data.encode('utf-8'))
    data=obj.recv(512)
    print('获取跑男A的信息：\n',data.decode('utf-8'))
    data=input('请输入信息：\n')
obj.close()